﻿CREATE TABLE [dbo].[ImageAnalysis]
(
	[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY(1,1),
	[ImageId] BIGINT NOT NULL,
	[ShortestAverageDistance] FLOAT NOT NULL,
	[ColorSpectrumDefinitionId] BIGINT NOT NULL, 
    [AverageHue] FLOAT NOT NULL, 
    [StandardHueDeviation] FLOAT NOT NULL, 
    [AnalysisDuration] FLOAT NOT NULL, 
    CONSTRAINT [DF_ImageAnalysis_Image] FOREIGN KEY ([ImageId]) 
		REFERENCES [dbo].[Image] ([Id]) ON DELETE CASCADE ON UPDATE NO ACTION,
	CONSTRAINT [DF_ImageAnalysis_ColorSpectrumDefinition] FOREIGN KEY ([ColorSpectrumDefinitionId]) 
		REFERENCES [dbo].[ColorSpectrumDefinition] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
)
